home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 16 / CheckBoxDemo.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  656 b   |  21 lines

  1. /* <applet code = "CheckBoxDemo" width=120 height=100>
  2.    </applet>
  3. */ 
  4. import java.awt.*;
  5. import java.applet.*;
  6. public class CheckBoxDemo extends Applet { 
  7. public void init() { 
  8. setLayout(null);
  9. int width = Integer.parseInt(getParameter("width"));
  10. int height = Integer.parseInt(getParameter("height"));
  11. Checkbox win95 = new Checkbox("Windows 95/98", null, true);
  12. Checkbox solaris = new Checkbox("Solaris 2.5");
  13. Checkbox mac = new Checkbox("MacOS 7.5");
  14. add(win95);
  15. add(solaris);
  16. add(mac);
  17. win95.reshape(0, 0, width, height / 3);
  18. solaris.reshape(0, height / 3, width, height / 3);
  19. mac.reshape(0, 2 * height / 3, width, height / 3);
  20. } }
  21.